package com.lgc.javathread.locktest.deadlock;

/**
 * 简单死锁程序
 * lockA、lockB分别是两个资源，线程A、B必须同是拿到才能工作
 * 但A线程先拿lockA、再拿lockB
 * B线程先拿lockB、再拿lockA
 */
public class DeadLock {
    public static void main(String[] args) {
        Object lockA = new Object();
        Object lockB = new Object();

        A a = new A(lockA, lockB);
        B b = new B(lockA, lockB);

        a.start();
        b.start();

        int res = 0;
    }
}
